import {defineStore} from "pinia";

const usePermissionStore = defineStore('permission', {
    // 为了完整类型推理，推荐使用箭头函数
    state: () => ({
        menus: [],
        roleNames: []
    }),
    actions: {
        setMenus(menus) {
            this.menus = menus
        },
        setRoleNames(roleNames) {
            this.roleNames = roleNames
        }
    }
})

export default usePermissionStore
